import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class ProviderGroup {
  static ChangeNotifierProvider<T> buildProviderView<T extends ChangeNotifier>({
    required T changeNotifier,
    required Widget Function(BuildContext context, T value, Widget? child) builder,
  }) {
    return ChangeNotifierProvider.value(
        value: changeNotifier,
        builder: (context, snapshot) {
          return Consumer<T>(builder: builder);
        });
  }
}
